package org.apache.lucene.ocean.util;

import java.util.Arrays;

/**
 * Pools long arrays for OpenBitSets
 */
public class LongArrayPool extends ObjectArrayPool<long[]> {
  public LongArrayPool(long evictTime) {
    super(evictTime);
  }
  
  protected long[] newObject(int length) {
    return new long[length];
  }
  
  public void returnObject(long[] longs) {
    Arrays.fill(longs, 0);
    ObjectArrays oa = getObjectArrays(longs.length);
    oa.add(longs);
  }
}
